package com.ssy.lingxi.order.model.vo.common.response;

import com.ssy.lingxi.common.constant.order.OrderTypeEnum;
import com.ssy.lingxi.order.model.constant.OrderOuterStatusEnum;
import com.ssy.lingxi.order.model.constant.OrderServiceContants;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 加工能力 - 查询加工订单
 * @author 万宁
 * @version 2.0.0
 * @date 2021-09-04
 */
public class OrderEnhancePageQueryVO implements Serializable {
    private static final long serialVersionUID = 5862949542603236364L;

    public OrderEnhancePageQueryVO(Long orderId, String orderNo, String digest, Long buyerMemberId, Long buyerRoleId, String buyerMemberName, Integer orderType, LocalDateTime createTime, Integer outerStatus, List<OrderEnhanceProductDetailVO> products) {
        this.orderId = orderId;
        this.orderNo = orderNo;
        this.digest = digest;
        this.buyerMemberId = buyerMemberId;
        this.buyerRoleId = buyerRoleId;
        this.buyerMemberName = buyerMemberName;
        this.orderType = orderType;
        this.orderTypeName = OrderTypeEnum.getNameByCode(this.orderType);
        this.createTime = createTime.format(OrderServiceContants.DEFAULT_TIME_FORMATTER);
        this.outerStatus = outerStatus;
        this.outerStatusName = OrderOuterStatusEnum.getNameByCode(this.getOuterStatus());
        this.products = products;
    }

    /**
     * 订单Id
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 订单摘要
     */
    private String digest;

    /**
     * 采购会员Id
     */
    private Long buyerMemberId;

    /**
     * 采购会员角色Id
     */
    private Long buyerRoleId;

    /**
     * 采购会员名称
     */
    private String buyerMemberName;

    /**
     * 订单类型枚举
     */
    private Integer orderType;

    /**
     * 订单类型名称
     */
    private String orderTypeName;

    /**
     * 订单创建时间
     */
    private String createTime;

    /**
     * 外部状态枚举
     */
    private Integer outerStatus;

    /**
     * 外部状态名称
     */
    private String outerStatusName;

    /**
     * 订单商品列表
     */
    private List<OrderEnhanceProductDetailVO> products;

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public Long getBuyerRoleId() {
        return buyerRoleId;
    }

    public void setBuyerRoleId(Long buyerRoleId) {
        this.buyerRoleId = buyerRoleId;
    }

    public String getBuyerMemberName() {
        return buyerMemberName;
    }

    public void setBuyerMemberName(String buyerMemberName) {
        this.buyerMemberName = buyerMemberName;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getOrderTypeName() {
        return orderTypeName;
    }

    public void setOrderTypeName(String orderTypeName) {
        this.orderTypeName = orderTypeName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Integer getOuterStatus() {
        return outerStatus;
    }

    public void setOuterStatus(Integer outerStatus) {
        this.outerStatus = outerStatus;
    }

    public String getOuterStatusName() {
        return outerStatusName;
    }

    public void setOuterStatusName(String outerStatusName) {
        this.outerStatusName = outerStatusName;
    }

    public List<OrderEnhanceProductDetailVO> getProducts() {
        return products;
    }

    public void setProducts(List<OrderEnhanceProductDetailVO> products) {
        this.products = products;
    }
}
